package com.ruoyi.system.service.impl;

import java.util.HashMap;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AdminUserBetRecordMapper;
import com.ruoyi.system.domain.AdminUserBetRecord;
import com.ruoyi.system.service.IAdminUserBetRecordService;

/**
 * 用户投注记录Service业务层处理
 *
 * @author ruoyi
 * @date 2020-11-06
 */
@Service
public class AdminUserBetRecordServiceImpl implements IAdminUserBetRecordService

{
    @Autowired
    private AdminUserBetRecordMapper adminUserBetRecordMapper;

    /**
     * 查询用户投注记录
     *
     * @param id 用户投注记录ID
     * @return 用户投注记录
     */
    @Override
    public AdminUserBetRecord selectAdminUserBetRecordById(Long id)
    {
        return adminUserBetRecordMapper.selectAdminUserBetRecordById(id);
    }

    @Override
    public List<AdminUserBetRecord> selectAdminUserBetRecordByPeriod(Long period) {
        return adminUserBetRecordMapper.selectAdminUserBetRecordByPeriod(period);
    }



    @Override
    public List<AdminUserBetRecord> selectAdminUserBetRecordByPeriodAndRoom(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectAdminUserBetRecordByPeriodAndRoom(adminUserBetRecord);
    }

    @Override
    public AdminUserBetRecord selectAdminUserBetRecordByPeriodAndRoomAndCommand(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectAdminUserBetRecordByPeriodAndRoomAndCommand(adminUserBetRecord);
    }

    @Override
    public List<AdminUserBetRecord> selectLuckUserBetRecord(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectLuckUserBetRecord(adminUserBetRecord);
    }

    @Override
    public List<AdminUserBetRecord> selectLuckUserBetRecordAndNotRoot(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectLuckUserBetRecordAndNotRoot(adminUserBetRecord);
    }

    @Override
    public List<HashMap<String,Object>> selectAdminUserBetRecordGroupByPayNum(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectAdminUserBetRecordGroupByPayNum(adminUserBetRecord);
    }

    @Override
    public List<AdminUserBetRecord> selectAdminUserBetRecordByPeriodAndRoomInfo(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectAdminUserBetRecordByPeriodAndRoomInfo(adminUserBetRecord);
    }

    @Override
    public Double selectSumPriceByPeriodAndRoom(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectSumPriceByPeriodAndRoom(adminUserBetRecord);
    }

    @Override
    public Double selectLuckSumPrice(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectLuckSumPrice(adminUserBetRecord);
    }

    @Override
    public Double selectSumPriceByPeriodAndRoomAndWexinId(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectSumPriceByPeriodAndRoomAndWexinId(adminUserBetRecord);
    }

    @Override
    public Double selectAllSumPriceByPeriodAndRoom(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectAllSumPriceByPeriodAndRoom(adminUserBetRecord);
    }

    /**
     * 查询用户投注记录列表
     *
     * @param adminUserBetRecord 用户投注记录
     * @return 用户投注记录
     */
    @Override
    public List<AdminUserBetRecord> selectAdminUserBetRecordList(AdminUserBetRecord adminUserBetRecord)
    {
        return adminUserBetRecordMapper.selectAdminUserBetRecordList(adminUserBetRecord);
    }

    @Override
    public List<AdminUserBetRecord> selectAdminUserBetRecordListByRoomAndPeriod(String room, Long period) {
        return adminUserBetRecordMapper.selectAdminUserBetRecordListByRoomAndPeriod(room,period);
    }

    @Override
    public List<AdminUserBetRecord> selectAdminUserBetRecordListForAdmin(AdminUserBetRecord adminUserBetRecord) {
        return adminUserBetRecordMapper.selectAdminUserBetRecordListForAdmin(adminUserBetRecord);
    }

    /**
     * 新增用户投注记录
     *
     * @param adminUserBetRecord 用户投注记录
     * @return 结果
     */
    @Override
    public int insertAdminUserBetRecord(AdminUserBetRecord adminUserBetRecord)
    {
        adminUserBetRecord.setCreateTime(DateUtils.getNowDate());
        return adminUserBetRecordMapper.insertAdminUserBetRecord(adminUserBetRecord);
    }

    /**
     * 修改用户投注记录
     *
     * @param adminUserBetRecord 用户投注记录
     * @return 结果
     */
    @Override
    public int updateAdminUserBetRecord(AdminUserBetRecord adminUserBetRecord)
    {
        adminUserBetRecord.setUpdateTime(DateUtils.getNowDate());
        return adminUserBetRecordMapper.updateAdminUserBetRecord(adminUserBetRecord);
    }

    /**
     * 批量删除用户投注记录
     *
     * @param ids 需要删除的用户投注记录ID
     * @return 结果
     */
    @Override
    public int deleteAdminUserBetRecordByIds(Long[] ids)
    {
        return adminUserBetRecordMapper.deleteAdminUserBetRecordByIds(ids);
    }

    /**
     * 删除用户投注记录信息
     *
     * @param id 用户投注记录ID
     * @return 结果
     */
    @Override
    public int deleteAdminUserBetRecordById(Long id)
    {
        return adminUserBetRecordMapper.deleteAdminUserBetRecordById(id);
    }

    @Override
    public int deleteAdminUserBetRecordByRoomAndPeriod(String room, Long period) {
        return adminUserBetRecordMapper.deleteAdminUserBetRecordByRoomAndPeriod(room,period);
    }
}
